var Highcharts = require('highcharts');

module.exports = {
    bar: {
        chart: {
            type: 'bar'
        },
        title: {
            text: '疫情对全球各行业经济的影响'
        },
        xAxis: {
            categories: ['旅游业', '零售业', '线上教育', '娱乐文化', '房地产业'],
            title: {
                text: null
            }
        },
        yAxis: {
            min: 0,
            title: {
                text: '收入 (千万)',
                align: 'high'
            },
            labels: {
                overflow: 'justify'
            }
        },
        tooltip: {
            valueSuffix: ' 百万'
        },
        plotOptions: {
            bar: {
                dataLabels: {
                    enabled: true,
                    allowOverlap: true // 允许数据标签重叠
                }
            }
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'top',
            x: -40,
            y: 100,
            floating: true,
            borderWidth: 1,
            backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
            shadow: true
        },
        series: [{
            name: '疫情前',
            data: [973, 914, 635, 699, 2730]
        }, {
            name: '疫情后',
            data: [107,208 , 2630, 707,3630]
        }]
    }
}